package demo.hw;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 *
 * 输入
 * abc
 * 123456789
 * 输出
 * abc0000
 * 12345678
 * 9000000
 *
 * @author taqo
 * @date 2021/5/24
 */
public class _字符串分割 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        List<String> l = new ArrayList<>();
        String s = null;
        while (!(s = sc.nextLine()).equals("")){
            l.add(s);
        }
        a(l);
        sc.close();
    }

    private static void a(List<String> l) {
        List<String> b = new ArrayList<>();
        for (String s : l) {
            def(b,s);
        }
        System.out.println(b);
    }

    private static void def(List<String> b, String s) {
        if (s.length() == 8) {
            b.add(s);
        }else if (s.length() < 8) {
            StringBuilder sn = substr(s);
            s = s + sn.toString();
            b.add(s);
        } else {
            String s1 = s.substring(0, 8);
            b.add(s1);
            String s2 = s.substring(8);
            b.add(s2+substr(s2));
        }
    }

    private static StringBuilder substr(String s) {
        StringBuilder sn  = new StringBuilder();
        for (int i = 0; i < 8-s.length(); i++) {
            sn.append("0");
        }
        return sn;
    }
}
